home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir26
/
epi601_2.zip
/
FILES07.EXE
/
BLOCK.EPA
< prev
next >
Wrap
Text File
|
1994-08-22
|
12KB
|
424 lines
_DOS erase temp
_DOS copy user1.txt doc1.txt
%
_DISPLAY
-- LESSON 5 --
BLOCK COMMANDS
..............................
_ENDDISPLAY
%
_DISPLAY
One of the advantages of word processing is the
ability to "cut and paste" portions of your document
without having to retype the entire document. These
capabilities are called BLOCK COMMANDS.
_ENDDISPLAY
%
_DISPLAY
The topics covered in this lesson include:
* defining a block of text
* copying, moving or deleting blocks
* writing blocks to another file
* reading files into the current file as
a block
_ENDDISPLAY
%
_DISPLAY
A BLOCK consists of any contiguous portion of text --
it may be as short as a line or as long as an entire
document.
Before you can use any of the block commands, you must
first define the block. Once the block is defined, you
can then copy, move or delete the block, or write the
block to another file.
All of the block commands can be found in the <F8>-BLK
menu.
_ENDDISPLAY
%
_DISPLAY
To define the block of text, you must mark the beginning
and end of the block using the <F8>-"Begin block" and
"End block" commands or <Ctrl-K B> and <Ctrl-K K>.
To mark the BEGINNING OF A BLOCK:
*Move the cursor to the first character of the
block.
*Press <F8>, select the "Begin block" option using
the up and down arrow keys, and press <Enter> or press
<Ctrl-K B>.
To mark the END OF A BLOCK:
*Move the cursor to the space just beyond the last
character of the block.
*Press <F8>, select the "End block" option using
the up and down arrow keys, and press <Enter> or press
<Ctrl-K K>.
_ENDDISPLAY
%
_DISPLAY
At the next screen, you will first retrieve a file and
then practice the first two block commands:
*Press <F2> and select "Open file this window".
*Type the filename DOC1.TXT in the prompt box
and press <Enter>. The file will appear on
the screen.
*Choose any part of the file to be the block. Move
the cursor to the first character of the block.
Press <F8>, select "Begin block" and press <Enter>
(or <Ctrl-K B>).
*Move the cursor just beyond the last character in
the block. Press <F8>, select "End block" and
press <Enter> (or <Ctrl-K K>). The block will
appear highlighted on the screen.
_ENDDISPLAY
%
[<F2>-Open file, file = DOC1.TXT; <F8>-Begin blk, then End blk]
_CLEARALL
%
_DISPLAY
As you noticed, after you marked the beginning and end
of the block, it appeared highlighted on the screen.
In order to invoke the block commands, the block must
be highlighted.
Once the command has been performed, you can remove the
highlight in one of two ways: by using the <F8>-"Hide
block display" command, or by pressing <Ctrl-K H>.
_ENDDISPLAY
%
_DISPLAY
The next block command to review is the COPY BLOCK command.
This is helpful if you have any portion of text that is
repeated throughout the document.
The COPY command places a duplicate of the block at the
specified point in the document; the original block is left
intact in its original position.
_ENDDISPLAY
%
_DISPLAY
To use the COPY BLOCK command:
*Mark the beginning and end of the block using
the <F8> pop-up menu or <Ctrl-K B> and <Ctrl-K K>.
*Move the cursor to the point in the document
where the block should be COPIED TO.
*Press <F8>, select "Copy block to here", and
press <Enter> or press <Ctrl-K C>.
*The block will be copied, and will appear
highlighted. Press <F8>-"Hide block display"
and then <Enter> (or <Ctrl-K H> to unhighlight
the block.
_ENDDISPLAY
%
_DISPLAY
The next screen will take you back to the file
DOC1.TXT. Practice using the <F8>-"Copy block
to here" command after marking the beginning and
end of the block.
_ENDDISPLAY
%
_OPENFILE DOC1.TXT
[Define block with <F8>, move cursor, <F8>-Copy block to here]
_CLEARALL
%
_DISPLAY
The next block command is MOVE BLOCK TO HERE. This is similar
to the Copy command except that the block of text is actually
moved, rather than copied, to the new location. The remaining
text moves to the left to fill the empty space left by the
block that was moved.
To use the MOVE command:
*Define the block of text to be moved.
*Move the cursor to the position where the block
should be moved.
*Press <F8>-"Move block to here" and then press <Enter>
or press <Ctrl-K V>.
*Unhighlight the block using <F8>-"Hide block display".
_ENDDISPLAY
%
_DISPLAY
Now return to the file and practice using the MOVE
BLOCK command. Notice how the text moves to fill
the space left when the block was moved.
To review the command again:
*Define the block using the <F8> menu.
*Place the cursor at the location where
the block will be moved.
*Press <F8>-"Move block to here" and
press <Enter>.
_ENDDISPLAY
%
_OPENFILE DOC1.TXT
[Define block, move cursor to new location, <F8>-Move block]
_CLEARALL
%
_DISPLAY
Another useful block command is DELETE BLOCK.
If you decide to remove a portion of the document,
this command allows you to do it more easily than
by deleting one line at a time.
One word of caution when deleting a block of text:
there is no way to undelete or restore a block in its
entirety. EPED stores only the last 20 lines that were
deleted, and allows you to undelete these 20 lines with
the <F4>-"Undelete" command. So, for example, if the
block that is deleted is 30 lines long, you could recall
the last 20 lines but the first 10 lines will be lost.
_ENDDISPLAY
%
_DISPLAY
To use the DELETE BLOCK command:
*Define the block to be deleted using the
<F8> menu.
*Press <F8>, select the "Delete block" option
and press <Enter>.
*The block will disappear from the screen and
the remaining text will move up to the point
where the block had been located.
At the next screen practice the DELETE BLOCK command.
Notice the remaining text as it is repositioned on the
screen.
_ENDDISPLAY
%
_OPENFILE DOC1.TXT
[<F8> Begin block & End block, then Delete block]
_CLEARALL
%
_DISPLAY
The next two block commands involve interaction with
other files.
The first command allows you to WRITE A BLOCK TO A
FILE. This copies the block to another file while
leaving the original block and file intact, as it did
in the Copy Block command.
The second command is READ FILE IN AS BLOCK. This
copies another file into your current document at the
cursor location. The file from which the block is read
remains unchanged.
_ENDDISPLAY
%
_DISPLAY
These two commands are useful if there is a portion
of text that is used frequently in letters or some
other document. You can write this portion of text
to a separate file.
When you create the next document that should include
this text, you simply read this separate file into
the new document. This eliminates the need to retype
the text each time it is required in a new document.
_ENDDISPLAY
%
_DISPLAY
Now let's review both of these commands in more detail.
To WRITE A BLOCK TO A FILE:
*Define the block in the current file using the
<F8> menu.
*Press <F8>, choose "Write block to file..", and
press <Enter>.
*In the prompt box, type the name of the file TO
WHICH the block should be written.
*Press <Enter> and the block will be written to
the other file.
_ENDDISPLAY
%
_DISPLAY
At the next screen, you will be back to the file
DOC1.TXT. Practice writing a block to another
file called TEMP. To review the steps again:
*Define the block with the <F8> menu.
*Press <F8>-"Write block to file..", and press
<Enter>
*Type the filename TEMP in the prompt box and
press <Enter>.
_ENDDISPLAY
%
_OPENFILE DOC1.TXT
[Define block, <F8>-Write block to.., file = TEMP, then <Enter>]
_CLEARALL
%
_DISPLAY
If you want to verify that the block was written to
the new file, you can simply retrieve the new file
using the <F2>-FILE menu. To do this:
*Press <F2> and select "Open file this window".
*At the prompt box, type the name of the file
that the block was written to.
*Press <Enter> and the file will be displayed
on the screen.
At the next screen, retrieve the file TEMP to verify
that the block you defined was written to this file.
_ENDDISPLAY
%
[<F2>-Open file, filename = TEMP, press <Enter>]
_CLEARALL
%
_DISPLAY
The second command, READ FILE IN AS BLOCK, copies
another file into the file in which you are currently
working. After the file is read into your current
document, the text will appear highlighted as a block.
You can hide the block display using the <F8>-"Hide
block display" command.
_ENDDISPLAY
%
_DISPLAY
The steps for reading a file in as a block are:
*Begin in the file INTO WHICH you want
to read the other file.
*Move the cursor to the location in the
document where you want the text to be
copied.
*Press <F8>-"Read file in as block", then
type the name of the file that contains
the text to be read into your current file.
Press <Enter> and the text from the other
file will be copied into your current file.
_ENDDISPLAY
%
_DISPLAY
Now you will return to the file DOC1.TXT. Practice
reading the file TEMP into the current file DOC1.TXT.
To review the steps again:
*While in the current file DOC1.TXT, move
the cursor to the location where you want
the text to appear.
*Press <F8>, select "Read file in as block"
and press <Enter>.
*At the prompt box, type the filename TEMP,
and press <Enter>. The contents of the file
TEMP will now appear as a highlighted block
in your current file. Move the cursor down
to see the highlighted block of text.
_ENDDISPLAY
%
_OPENFILE DOC1.TXT
[Move cursor, <F8>-Read file in.., file = TEMP, then <Enter>]
_CLEARALL
%
_DISPLAY
The last command in the <F8> menu, FORMAT CURRENT BLOCK,
is useful if you want to reformat a portion of your
document, or to reformat a block of text that was read
into the current document from another file. This is
similar to the "Reformat paragraph" command, except that
it allows you to reformat more than one paragraph at a
time. This command functions only if word wrap is On.
The steps are similar to the other block commands:
*Define the block using the <F8> menu.
*Select "Format current block" and press
<Enter>. The text in the entire block will
be reformatted.
_ENDDISPLAY
%
_DISPLAY
That completes the introduction to BLOCK COMMANDS.
Let's review once again all of the commands included
in the <F8>-BLK menu:
*In order to perform the block commands, you
must first define the block, and make sure
that the block is highlighted.
*To DEFINE A BLOCK, mark the beginning and end
of the block using the "Begin block" and "End
block" commands.
_ENDDISPLAY
%
_DISPLAY
*COPY BLOCK TO HERE places a duplicate of the
block at the specified location in the document.
*MOVE BLOCK TO HERE moves the specified block to
a new location in the document. Remaining text
moves left to fill the space where the block
was originally located.
*DELETE BLOCK removes the defined block from the
file. Remaining text moves left to fill the blank
spaces.
_ENDDISPLAY
%
_DISPLAY
*WRITE BLOCK TO FILE copies a block to another
file, leaving the original block intact.
*READ FILE IN AS BLOCK copies another file into
the current file.
*FORMAT CURRENT BLOCK reformats an entire block of
text rather than one paragraph at a time, as in
the <F4>-Format paragraph command. This command
is functional only if word wrap is On.
_ENDDISPLAY
%
_DISPLAY
That concludes Lesson 5. Now you will return to
the Tutorial Menu, where you can choose another
lesson or exit from the tutorial.
_ENDDISPLAY
%
_RUN WPTM.EPA